home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Rockford Magazine
/
Rockford_Magazine_022_19xx_-_de_Disk_1_of_4_Side_A.d64
/
seq file reader
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2023-02-26
|
2KB
|
76 lines
100 poke53280,14:poke53281,13:printchr$(142)"[147][144]"tab(12)"sequential file"
105 printtab(12)"reader/printer":printtab(18)"by"
110 printtab(13)"roger b. fry":forx=1to2000:next
115 print"[147]"chr$(14)"options:[146]":print"f1 = directory"
120 print"f3 = screen only":print"f5 = hardcopy"
125 print"f7 = kill disk file"
130 getk$:ifk$=""ork$<chr$(133)ork$>chr$(136)then130
135 ifk$=chr$(136)then365
140 ifk$>chr$(133)then240
145 printchr$(142)"[147]directory[146]":print"f1 = screen only"
150 print"f3 = hardcopy":print"f5 = cancel function":p=0
155 getk$:ifk$=""ork$<chr$(133)ork$>chr$(135)then155
160 ifk$=chr$(135)then115
165 ifk$=chr$(133)then175
170 open4,4:print#4:print#4,chr$(14)"directory"chr$(15):print#4:print#4:p=1
175 print"[147]directory[146]":print:print:open1,8,0,"$0":get#1,a$,b$:n$=chr$(0)
180 get#1,a$,b$:ifb$=""then220
185 get#1,a$,b$:printasc(a$+n$)+256*asc(b$+n$);
190 ifp=1thenprint#4,asc(a$+n$)+256*asc(b$+n$);
195 get#1,a$:ifa$=""then210
200 ifp=1thenprint#4,a$;
205 printa$;:goto195
210 print:ifp=1thenprint#4
215 goto180
220 ifp=1thenforx=1to7:print#4:nextx:p=0
225 print:print"press any key to continue.":close1:close4
230 getk$:ifk$=""then230
235 goto115
240 open1,4,7:l=1:p=0:ifk$=chr$(135)thenp=1
245 print"[147][201] need a filename:[146] ";:inputf$
250 open8,8,8,f$+",s,r":gosub440
255 print"[147]press any key to pause[146]"
260 print:print:printtab(10)""f$"[146]":print:print
265 ifp=1thenprint#1,chr$(145)chr$(14)f$chr$(15)chr$(17):print#1:print#1:l=4
270 get#8,ch$:poke212,0:ifst=0then280
275 ifst=64then340
280 printch$"[144]";
285 ifp=1thenprint#1,ch$;:ifch$=chr$(13)thenl=l+1:gosub455
290 getk$:ifk$=""then270
295 print:forx=1to39:print"*";:nextx:print:print"pause is in effect[146]"
300 print"options:":print"f1 = printer on":print"f3 = printer off"
305 print"f5 = abort operation":print"f7 = continue unchanged"
310 getk$:ifk$<chr$(133)ork$>chr$(136)then310
315 ifk$=chr$(133)thenp=1:print#1,chr$(17):print#1:print#1:l=3:goto330
320 ifk$=chr$(134)thenp=0:goto330
325 ifk$=chr$(135)then335
330 print"continuing[146]":forx=1to39:print"*";:next:print:goto270
335 print"[147]"tab(11)chr$(142)"operation aborted[146]"
340 ifp=1thenprint#1:forx=l+2to66:print#1:nextx:print#1,chr$(145)
345 close1:close8:print:print"do you wish to read":print"another file? (y/n)"
350 getk$:ifk$="y"thenclr:goto115
355 ifk$<>"n"then350
360 end
365 poke53280,2:poke53281,2:printchr$(142):gosub465
370 print"type in the filename to be scratched"
375 print"or press return to abort the function."
380 print"filename:[146]";:inputf$
385 iff$=""then410
390 gosub465:print"last chance!":print"do you really wish to kill"
395 print"the "f$" [146] file? (y/n)"
400 getk$:ifk$=""then400
405 ifk$="y"then415
410 poke53280,14:poke53281,13:print"[144]"chr$(14):goto335
415 gosub465:print"killing "f$
420 close15:open15,8,15:print#15,"s0:"+f$
425 forx=1to2000:nextx:close15
430 gosub465:print""f$" is now dead!!"
435 forx=1to2000:nextx:poke53280,14:poke53281,13:print"[144]"chr$(14):goto115
440 close15:open15,8,15:input#15,d,e$,f,g
445 ifd>0thenprint:print"there is a disk error":printd;e$;f;g:close15:goto345
450 return
455 ifl=60thenl=1:forx=1to7:print#1:nextx
460 return
465 print"[147]"tab(8)" kill function active [146]"
470 return